package com.dyna.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.dyna.constants.DateFatter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("virtual_locker")
@ApiModel("virtual_locker")
public class VirtualLocker implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("寄存柜id")
    private Long lockerId;
    
    @ApiModelProperty("用户ID（关联用户表）")
    private Integer userId;

    
    @ApiModelProperty("虚拟物品ID（关联商品表）")
    private Long skuId;

    
    @ApiModelProperty("物品类型")
    private String itemType;

    
    @ApiModelProperty("购入原价（单位：元）")
    private BigDecimal purchasePrice;

    
    @ApiModelProperty("折扣率（如0.8表示8折，1.0表示无折扣）")
    private BigDecimal discountRate;

    
    @ApiModelProperty("使用的优惠券ID（关联coupon表）")
    private Long couponId;

    
    @ApiModelProperty("实际支付金额（含折扣/优惠券）")
    private Double finalPayAmount;


    @ApiModelProperty(value = "数量", notes = "同一个物品不同价格购买的数量")
    private Long count;

    
    @ApiModelProperty("购买时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime purchaseTime;

    
    @ApiModelProperty("寄存到期时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime expireTime;

    
    @ApiModelProperty("状态")
    private Integer status;

    public VirtualLocker() {}
}